package com.fyales.android.juhejoke.model;

import java.util.ArrayList;
import java.util.List;

/**
 * @author fyales
 * @since 16/7/29.
 */
public class Student {

    private String name;
    private List<Course> list;

    public Student(String name){
        this.name = name;
    }

    public Student(String name,List<Course> list){
        this.name = name;
        this.list = list;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<Course> getCourse() {
        return list;
    }

    public void setCourse(List<Course> list) {
        this.list = list;
    }

    public void addCourse(Course course){
        if (list == null){
            list = new ArrayList<>();
        }
        list.add(course);
    }


}
